package com.tueye.service.impl.usermanager;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.base.util.Page;
import com.tueye.dao.usermanager.IRegisterDao;
import com.tueye.entity.Adinfo;
import com.tueye.entity.user.ParticularUserInfo;
import com.tueye.entity.user.User;

import com.tueye.service.exception.TuEyeServiceException;
import com.tueye.service.usermanager.IRegisterService;

@Scope("prototype")
@Component("registerService")
public class RegisterServiceImpl extends BaseService implements IRegisterService{
	
	@Autowired
	@Qualifier("registerDao")
	private IRegisterDao registerDao;

	@SuppressWarnings("unchecked")
	@Override
	public List getUserByemail(String Email) throws TuEyeServiceException {
		// TODO Auto-generated method stub
		return registerDao.getUserByemail(Email);
	}

	@Override
	@SuppressWarnings("unchecked")
	public List getUserBybyname(String byname) throws TuEyeServiceException {
		// TODO Auto-generated method stub
		return registerDao.getUserBybyname(byname);
	}

	@Override
	public void saveUser(User user) throws TuEyeServiceException {
		// TODO Auto-generated method stub
		  registerDao.saveUser(user);
	}

	@Override
	@SuppressWarnings("unchecked")
	public List getUserLogin(String Email)
			throws TuEyeServiceException {
		// TODO Auto-generated method stub
		return registerDao.getUserLogin(Email);
	}

	@Override
	public void updateUser(User user) throws TuEyeServiceException {
		// TODO Auto-generated method stub
		registerDao.updateUser(user);
	}

	@Override
	@SuppressWarnings("unchecked")
	public List getParticularuserinfo(String id) throws TuEyeServiceException {
		// TODO Auto-generated method stub
		return registerDao.getParticularuserinfo(id);
	}

	@Override
	public void updateParticularUserInfo(ParticularUserInfo pu)
			throws TuEyeServiceException {
		// TODO Auto-generated method stub
		registerDao.updateParticularUserInfo(pu);
	}

	@Override
	public Page pagedQueryByHQL(String hql, int pageNo, int pageSize,
			Object... values)throws TuEyeServiceException {
		return registerDao.pagedQueryByHQL(hql, pageNo, pageSize, values);
	}
	@Override
	public void delUser(String id) throws TuEyeServiceException {
		registerDao.delUser(id);
    }
	@Override
	public User getUserById(String id) throws TuEyeServiceException{
		return registerDao.getUserById(id);
	}
	
	
	
}